package com.wootion.cims.general.utils;

/**
 * 阿里短信发送工具类
 *
 * <dependency>
 *   <groupId>com.aliyun</groupId>
 *   <artifactId>aliyun-java-sdk-core</artifactId>
 *   <version>4.5.16</version>
 * </dependency>
 * <dependency>
 *     <groupId>com.aliyun</groupId>
 *     <artifactId>aliyun-java-sdk-dysmsapi</artifactId>
 *     <version>1.1.0</version>
 * </dependency>
 */
public class SMSUtils {

   /**
    * 发送短信
    * @param signName 签名
    * @param templateCode 模板
    * @param phoneNumbers 手机号
    * @param param 参数
    */
//   public static void sendMessage(String signName, String templateCode,String phoneNumbers,String param){
//      DefaultProfile profile = DefaultProfile.getProfile("cn-hangzhou", "", "");
//      IAcsClient client = new DefaultAcsClient(profile);
//      SendSmsRequest request = new SendSmsRequest();
//      request.setSysRegionId("cn-hangzhou");
//      request.setPhoneNumbers(phoneNumbers);//手机号
//      request.setSignName(signName);//签名
//      request.setTemplateCode(templateCode);//设置魔板code
//      request.setTemplateParam("{\"code\":\""+param+"\"}");
//      try {
//         SendSmsResponse response = client.getAcsResponse(request);
//         System.out.println("短信发送成功");
//      }catch (ClientException e) {
//         e.printStackTrace();
//      }
//   }
}